﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace XjjXmm.Spider
{
    [SugarTable("spider_novel")]
    internal class NovelEntity
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [SugarColumn(ColumnName = "Id", IsPrimaryKey = true, IsIdentity=true)]
        public int Id { get; set; }

        /// <summary>
        /// 小说名
        /// </summary>
        [SugarColumn(ColumnName = "title")]
        public string Title { get; set; } = "";

        /// <summary>
        /// 作者
        /// </summary>
        [SugarColumn(ColumnName = "author")]
        public string Author { get; set; } = "";

        /// <summary>
        /// 分类
        /// </summary>
        [SugarColumn(ColumnName = "category")]
        public string Category { get; set; } = "";

        /// <summary>
        /// 是否连载
        /// </summary>
        [SugarColumn(ColumnName = "is_instalment")]
        public bool IsInstalment { get; set; }

        /// <summary>
        /// 是否连载
        /// </summary>
        [SugarColumn(ColumnName = "update_time")]
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 是否连载
        /// </summary>
        [SugarColumn(ColumnName = "last_chapter")]
        public string LastChapter { get; set; }


        /// <summary>
        /// 是否连载
        /// </summary>
        [SugarColumn(ColumnName = "intro")]
        public string Intro { get; set; }

        /// <summary>
        /// 网站地址
        /// </summary>
        [SugarColumn(ColumnName = "domain")]
        public string Domain { get; set; } = "";

        /// <summary>
        /// 小说地址
        /// </summary>
        [SugarColumn(ColumnName = "link")]
        public string Link { get; set; } = "";

        /// <summary>
        /// 抓取时间
        /// </summary>
        [SugarColumn(ColumnName = "fetch_time")]
        public DateTime? FetchTime { get; set; }

        /// <summary>
        /// 抓取撞他 0：未开始， 1： 抓取中 2： 抓取完成   3.其他站点抓取完成
        /// </summary>
        [SugarColumn(ColumnName = "status")]
        public int Status { get; set; } = 0;


       // [SugarColumn(IsIgnore = true)]
       // public IEnumerable<Chapter> Chapters { get; set; }
    }
}
